﻿@model Models.DataModel.Port
@{
    ViewBag.Title = "Edit Port";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>
@using (Html.BeginForm("EditPort", "Port", FormMethod.Post, new { @class = "form-horizontal", role = "form", name = "dataupload", id = "dataupload", onsubmit = "return CheckInput();" }))
{
    @Html.ValidationSummary(true);
    @Html.HiddenFor(c => c.PortId)
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("Port Number")</div>
        <div class="col-xs-6 col-md-4">
            @Html.TextBoxFor(c => c.PortNumber)
            @Html.ValidationMessageFor(c => c.PortNumber)
        </div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("Name")</div>
        <div class="col-xs-6 col-md-4">
            @Html.TextBoxFor(c => c.Name)
            @Html.ValidationMessageFor(c => c.Name)
        </div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("Address 1")</div>
        <div class="col-xs-6 col-md-4">@Html.TextBoxFor(c => c.Address1)</div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("Address 2")</div>
        <div class="col-xs-6 col-md-4">@Html.TextBoxFor(c => c.Address2)</div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("City")</div>
        <div class="col-xs-6 col-md-4">@Html.TextBoxFor(c => c.City)</div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("ZipCode")</div>
        <div class="col-xs-6 col-md-4">@Html.TextBoxFor(c => c.ZipCode)</div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("State of province")</div>
        <div class="col-xs-6 col-md-4">@Html.TextBoxFor(c => c.StateOrProvice)</div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("Country")</div>
        <div class="col-xs-6 col-md-4">@Html.DropDownListFor(c => c.CountryId, ViewBag.lstCountryCode as SelectList)</div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("CreatedOn")</div>
        <div class="col-xs-6 col-md-4">@Html.TextBoxFor(c => c.CreatedOn, new { @readonly = true })</div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("ModifiedBy")</div>
        <div class="col-xs-6 col-md-4">@Html.TextBoxFor(c => c.ModifiedBy, new { @readonly = true })</div><br />
    </div><br />
    <div class="">
        <div class="col-xs-12 col-sm-6 col-md-2">@Html.Label("ModifiedByName")</div>
        <div class="col-xs-6 col-md-4">@Html.TextBoxFor(c => c.ModifiedByName, new { @readonly = true, @Value = Session["user"].ToString() })</div><br />
    </div><br />
    <input type="submit" value="Save" class="btn btn-primary" style="margin-left:200px" />
}

